home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / hardware-part1 / 5864 < prev    next >
Encoding:
Text File  |  1996-08-05  |  8.1 KB  |  250 lines

  1. Path: tcp.co.uk!usenet
  2. From: rooster@tcp.co.uk (rooster)
  3. Newsgroups: comp.sys.amiga.hardware
  4. Subject: Answers to our prayers?Chunky gfx adaptor.
  5. Date: 29 Feb 1996 23:14:40 GMT
  6. Organization: Total Connectivity Providers - Internet access for the UK
  7. Message-ID: <7931.6633T1364T192@tcp.co.uk>
  8. NNTP-Posting-Host: du2-47.tcp.co.uk
  9. X-Newsreader: THOR 2.22 (Amiga;TCP/IP) *UNREGISTERED*
  10.  
  11. Tf50 several bitplanes.Does the item detailed below now
  12. mean this is no longer a problem?Someone please enlighten me.
  13. If it is a dream come true let's hope it isn't expensive eh?
  14. Any programmers and software houses interested?There is an Email
  15. adress at the bottom and at the web site is a DMS file of
  16. development software.
  17.  
  18. AGX Module programming information
  19. Copyright (C) 1995 AUSTEX SOFTWARE
  20. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  21.  
  22. OVERVIEW
  23.  
  24. The AGX module is a device which plugs into the video port of any Amiga. It
  25. has a video pass-through for standard Amiga screens and accepts standard
  26. Amiga video monitor signals.
  27.  
  28. The device can convert out-going video signals from the video port into byte
  29. per
  30. pixel format or chunky pixels. Resolutions range from 160, 320 on OCS/ECS
  31. Amiga
  32. machines to 160,320 and 640 for AGA compatible machines. Combinations of these
  33. outputs may be mixed on one screen in a similar fashion to 'viewports' on the
  34. Amiga.
  35.  
  36. The Amiga screen for a 320 resolution is a 640 hires screen in four bitplanes.
  37. Each bitplane is represented at the video port by the RGBI signals. As each
  38. bit of video information from the RGBI lines is output, it is stored into one
  39. of four shift registers where the data is then latched in byte format. As the
  40. next four bytes are fetched, the current four bytes can be displayed in
  41. sequence
  42. without any loss in data integrity.
  43.  
  44.  
  45. ACTIVATING
  46.  
  47. The device is activated by setting the GENLOCK_AUDIO flag in the BPLCON0
  48. register
  49. for each line that the chunky mode is on. ( BPLCON0 = $100, GENLOCK_AUDIO =
  50. $100
  51. (bit8) ) This bit must remain on for each video line during the chunky screen.
  52. If
  53. the bit is cleared for one video line, the AGX device will clear the mode and
  54. the
  55. set the clock speed back to default. Doing this allows more than one type of
  56. resolution mode per screen.
  57.  
  58. Usually, for the first few lines of the screen the 'hidden' programming
  59. information
  60. such as color palette, chunky mask, and conversion speed may by programmed.
  61. Once
  62. this has been done, the 'chunky enabled' sequence is written to the screen to
  63. allow
  64. the conversion process to take place.
  65.  
  66.  
  67. BITPLANE FORMAT
  68.  
  69. The format of the screen data can be handled by the axchunky library routines
  70. supplied
  71. with the device. This allows the user to set up all the data without specific
  72. knowledge
  73. of the current screen format etc.., but for those who wish to write directly
  74. to the screen;
  75.  
  76.         Pre-Chunky data format.
  77.                 Bitplane        Function
  78.                 3 2 1 0         -------------------------------------
  79.  
  80.                 0 0 0 x         Reserved
  81.                 0 0 1 x         Reserved
  82.                 0 1 0 0         Reserved
  83.                 0 1 0 1         Chunky mode enable
  84.                 0 1 1 0         Clock select bit 0 set
  85.                 0 1 1 1         Clock select bit 1 set
  86.                 1 0 0 d         Pixel address register
  87.                 1 0 1 d         Color palette RAM
  88.                 1 1 0 d         Pixel read mask register
  89.                 1 1 1 x         Reserved
  90.  
  91.                 x = Don't care    d = data (one byte)
  92.  
  93.         Screen data format type 1. OCS/ECS: 160,320 or AGA 160,320,640
  94.  
  95.                 Bitplane 0      Pixel 0, 4,  8, 12, ...
  96.                 Bitplane 1      Pixel 1, 5,  9, 13, ...
  97.                 Bitplane 2      Pixel 2, 6, 10, 14, ...
  98.                 Bitplane 3      Pixel 3, 7, 11, 15, ...
  99.  
  100.         Screen data format type 2. ECS/AGA: 160 only
  101.  
  102.                 Bitplane 0      Pixel 0, 1, 2, 3, ...
  103.  
  104.                 (this screen mode would be defined as a single bitplane
  105.                  super-hires screen with bitplanes 1-3 pointing to bitplane 0)
  106.  
  107.  
  108. The normal sequence for the 'hidden programming' section is;
  109.  
  110. 1. Set the clock speed
  111. 2. Set the pixel read mask register (usually $ff)
  112. 3. Set the pixel address register (usually $00)
  113. 4. Write the palette information
  114. 5. Enable chunky mode
  115.  
  116.  
  117. RAMDAC
  118.  
  119. The AGX module uses a simple RAMDAC to generate the new RGB signals. The
  120. RAMDAC
  121. contains some palette RAM, a pixel mask register, control circuitry and a fast
  122. D/A converter.
  123.  
  124. The pixel mask register can be used to control a psuedo bitplane depth, e.g.
  125. setting the pixel mask register to $3f gives the effect of 6 bitplanes worth
  126. of
  127. data. Normally this register would be set to $ff for 256 colors.
  128.  
  129. The pixel address register is normally set to the starting color for the
  130. palette writes. Normally set this to $00.
  131.  
  132. The palette RAM is written in triplet sets. Each color is represented by an
  133. 18-bit
  134. RGB value. As each color is written, an index pointer is incremented to the
  135. next
  136. color etc...
  137.  
  138.  
  139. CONVERSION SPEED
  140.  
  141. Setting the speed determines the conversion resolution. There are only three
  142. valid
  143. settings;
  144.  
  145.         Clock Select bits:
  146.              C1 C0
  147.              0  0       : 320 resolution (default)
  148.              0  1       : 640 resolution
  149.              1  0       : 160 resolution
  150.              1  1       : Reserved (no clock)
  151.  
  152. The default clock is 320 resolution. Any time that the Genlock bit is cleared
  153. for one
  154. video line the clock bits are cleared back to the default. The chunky mode is
  155. also
  156. cleared so that new programming information may be performed.
  157.  
  158.  
  159. EXAMPLE SCREEN
  160.  
  161. An example setup for a 160 resolution screen could be;
  162.  
  163.  
  164. First row
  165. Bitplane 3:     $00,...
  166. Bitplane 2:     $ff,...
  167. Bitplane 1:     $ff,...
  168. Bitplane 0:     $ff,...
  169.                  ^^
  170.                  |
  171.                  -------------- Set C1 bit, clock set to 160 mode
  172.  
  173. Second row
  174. Bitplane 3:     $ff,    $ff,    $ff,    $ff,    $ff,    $ff,    $ff,
  175. $ff,...
  176. Bitplane 2:     $ff,    $00,    $00,    $00,    $00,    $00,    $00,
  177. $00,...
  178. Bitplane 1:     $00,    $00,    $ff,    $ff,    $ff,    $ff,    $ff,
  179. $ff,...
  180. Bitplane 0:     $ff,    $00,    $00,    $00,    $00,    $10,    $10,
  181. $10,...
  182.                  ^^      ^^     á^^      ^^     á^^     á^^     á^^     á^^
  183.                 |       |       |       |       |       |       |       |
  184.                 |       |       |       |       |       |       |       ---
  185. Color 1 Blue
  186.                 |       |       |       |       |       |       -----------
  187. Color 1 Green
  188.                 |       |       |       |       |       -------------------
  189. Color 1 Red
  190.                 |       |       |       |       ---------------------------
  191. Color 0 Blue
  192.                 |       |       |       -----------------------------------
  193. Color 0 Green
  194.                 |       |       -------------------------------------------
  195. Color 0 Red
  196.                 |       ---------------------------------------------------
  197. Starting color is 0
  198.                 -----------------------------------------------------------
  199. Pixel mask is 255
  200.  
  201.  
  202. The next few rows contain the color triplets until all 255 colors have been
  203. defined, then
  204. finally we switch the chunky display mode on. In the example, palette color 0
  205. is $00,$00,$00
  206. palette color1 is $10,$10,$10 etc...
  207.  
  208. Nth row
  209. Bitplane 3:     ...,    $00,...
  210. Bitplane 2:     ...,    $ff,...
  211. Bitplane 1:     ...,    $00,...
  212. Bitplane 0:     ...,    $ff,...
  213.  
  214.                          ^^
  215.                          |
  216.                          ------------------ Enable chunky mode
  217.  
  218. Nth+1 row
  219. Bitplane 3:     $00,    $04, ...
  220. Bitplane 2:     $01,    $05, ...
  221. Bitplane 1:     $02,    $06, ...
  222. Bitplane 0:     $03,    $07, ...
  223.  
  224. Would then output on the screen color 0,1,2,3,4,5,6,7 etc...  N is the number
  225. of rows required
  226. at the top of the screen to set the palette information etc.. This 160 screen
  227. is for a scrambled
  228. setup. For a true linear 160 mode, the N rows of information could be setup
  229. the same with a
  230. 320 x 4 bitplane top section and a 1280 x 1bitplane super-hires screen for
  231. rows N+1 and down.
  232.  
  233. The device will remain in chunky mode as long as the GENLOCK_AUDIO bit is set
  234. for each video
  235. line. (usually only need to set this bit in the BPLCON0 register once)
  236.  
  237.  
  238.  
  239.  
  240.  
  241. Any queries may be directed to steve@ph4227b.jcu.edu.au
  242.  
  243. Stephen J.Smith
  244. AUSTEX SOFTWARE
  245.  
  246.  
  247.  
  248.                Andy O'Dowd (rooster)
  249.  
  250.